const pageData = {
  data: {
    word: []
  },
};
const selectWord = function (select) {
if(select==1){
  console.log(aaa);
  for (var i = 0; i < 16; i++) {
    var word = list.wordList[i]
    this.setData({ ['word[' + i + '].text']: word.content });
    i++;
    this.setData({ ['word[' + i + '].text']: word.definition });
  }
  setWord();
  wx.redirectTo({
    url: 'pages/wordlist1/wordlist1'
  });
}
if(select==2){
  for (var i = 0; i < 16; i++) {
    var word = list.wordList[i]
    this.setData({ ['word[' + i + '].text']: word.content });
    i++;
    this.setData({ ['word[' + i + '].text']: word.definition });
  }
  setWord();
  wx.redirectTo({
    url: 'pages/wordlist1/wordlist1'
  });
}
if(select==3){
  for (var i = 0; i < 16; i++) {
    var word = list.wordList[i]
    this.setData({ ['word[' + i + '].text']: word.content });
    i++;
    this.setData({ ['word[' + i + '].text']: word.definition });
  }
  setWord();
  wx.redirectTo({
    url: 'pages/wordlist1/wordlist1'
  });
}
};
function setWord() {
  wx.setStorageSync('1', this.data.word[0].text),
    wx.setStorageSync('2', this.data.word[2].text),
    wx.setStorageSync('3', this.data.word[4].text),
    wx.setStorageSync('4', this.data.word[6].text),
    wx.setStorageSync('5', this.data.word[8].text),
    wx.setStorageSync('6', this.data.word[10].text),
    wx.setStorageSync('7', this.data.word[12].text),
    wx.setStorageSync('8', this.data.word[14].text),
    wx.setStorageSync('9', this.data.word[15].text),
    wx.setStorageSync('10', this.data.word[13].text),
    wx.setStorageSync('11', this.data.word[11].text),
    wx.setStorageSync('12', this.data.word[9].text),
    wx.setStorageSync('13', this.data.word[7].text),
    wx.setStorageSync('14', this.data.word[5].text),
    wx.setStorageSync('15', this.data.word[3].text),
    wx.setStorageSync('16', this.data.word[1].text)
}
Page(pageData);